package day06.YiChang;

public class Lian01 {
    public static void main(String[] args) {
        int[] arr = null;
        try {
            prinArr(arr);
        }catch (NullPointerException e){
            System.out.println("参数不能为null");
        }
        System.out.println("嘿嘿嘿,我最帅!!!");
    }

    private static void prinArr(int[] arr) {
        if (arr == null) {
            throw new NullPointerException();
        } else {
            for (int i = 0; i < arr.length; i++) {
                System.out.println(arr[i]);
            }
        }
    }
}
